Component({
  properties: {
    show: { type: Boolean, value: false },
    newBookName: { type: String, value: '' },
    newBookType: { type: String, value: 'textbook' },
    modalAnimation: { type: Object, value: null }
  },
  methods: {
    close() { this.triggerEvent('close'); },
    onInput(e) { this.triggerEvent('input', { value: e.detail.value }); },
    selectType(e) { const { type } = e.currentTarget.dataset; this.triggerEvent('selecttype', { type }); },
    confirm() { this.triggerEvent('confirm'); },
    // 监听导入成功事件
    onImportSuccess() {
      console.log('wb-modal-create收到importsuccess事件，准备关闭弹窗');
      this.close();
    }
  }
});
